Skip to content

Fix Folia compatibility for 1.21.8+#16

Open
EfraGamer300 wants to merge 1 commit into
lucko:mainfrom
EfraGamer300:main
Open

Fix Folia compatibility for 1.21.8+#16
EfraGamer300 wants to merge 1 commit into
lucko:mainfrom
EfraGamer300:main

Conversation

@EfraGamer300

Copy link
Copy Markdown

Summary

Fixes compatibility with Folia 1.21.8+ where the Moonrise \TickData\ API classes (\TickData.TickReportData, \TickData.SegmentedAverage) are not available, causing \NoClassDefFoundError\ when running spark commands.

Changes

  • FoliaTickStatistics: Wrap \ ps()\ and \mspt()\ methods in try-catch for \LinkageError\ to gracefully handle missing Moonrise classes. Refactored \SegmentedDoubleAverageInfo\ to avoid compile-time references to Moonrise types by computing statistics via reflection only when needed.
  • FoliaSparkPlugin: Expanded \ThreadDumper\ regex patterns to match multiple Folia region thread naming conventions across different versions.

Fixes #12

- Handle missing Moonrise TickData classes (TickReportData, SegmentedAverage)
  in FoliaTickStatistics by catching LinkageError and falling back to defaults
- Replace SegmentedDoubleAverageInfo record to avoid compile-time references
  to Moonrise types
- Expand ThreadDumper regex patterns to match multiple Folia region thread
  naming conventions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Exception occured while rotating profiler job Folia 1.21.4

1 participant